package com.hbnu.system.utils;

import com.hbnu.system.model.entity.Audit;

import java.time.LocalDateTime;

/**
 * 审核记录工具类：封装审核记录构建逻辑
 */
public class AuditUtils {

    /**
     * 构建审核记录
     * @param synthesisId 业务ID（项目编号）
     * @param role 审核角色
     * @param auditorName 审核人姓名
     * @param statusChange 状态变更描述
     * @param opinion 审核意见
     * @return 构建好的Audit对象
     */
    public static Audit buildAudit(
            String synthesisId,
            String role,
            String auditorName,
            String statusChange,
            String opinion
    ) {
        Audit audit = new Audit();
        audit.setSynthesisID(synthesisId);
        audit.setAuditerRole(role);
        audit.setAuditerName(auditorName);
        audit.setStatusChange(statusChange);
        audit.setAuditOpinion(opinion);
        audit.setAuditerTime(LocalDateTime.now());
        return audit;
    }
}